package com.tianpengtech.admin.appsetting;
import com.jfinal.aop.Before;
import com.jfinal.plugin.activerecord.Model;
import com.tianpengtech.admin.AbstractAdminController;
import com.tianpengtech.admin.InitInterceptor;
import com.tianpengtech.common.exception.ValidateException;
import com.tianpengtech.common.model.appsetting.AppSetting;

/**
* 路由配置地址：add("/admin/appsetting", AppSettingAdminController.class, "/admin/appsetting");
* 数据库映射地址：arp.addMapping(AppSetting.dao.tableName(),AppSetting.class);
*/
@Before(InitInterceptor.class)
public class AppSettingAdminController extends AbstractAdminController{

	@Override
	protected void config() {
		this.clazz=AppSetting.class;
		this.service=new AppSettingAdminServiceImpl();
	}

	@Override
	public void beforeAdd() {

	}

	@Override
	public void beforeAdd(Model< ? > model) throws ValidateException {

	}

	@Override
	public void beforeQueryById(Model<?> model, int id) {

	}

	@Override
	public void beforeUpdate(Model< ? > model) throws ValidateException {

	}

	@Override
	public void beforeDelete(Model< ? > model) {

	}

	@Override
	public void parsePageRecord(Object results) {
		AppSetting appSetting = (AppSetting)results;
		appSetting.put("cateogry_str",appSetting.category());
	}
}

	